<template>
  <div class="dashboard-container">
    <div class="dashboard-text">
      <el-card :body-style="{ paddingBottom: '50px' }">
        <div slot="header" class="clearfix">用户信息</div>
        <div class="dash-content">
          <div class="dash-item">
            <div class="dash-name">账户名</div>
            <div>{{ this.$store.state.user.username }}</div>
          </div>
          <div class="dash-item">
            <div class="dash-name">全称</div>
            <div>{{ this.$store.state.user.name }}</div>
          </div>
          <div class="dash-item">
            <div class="dash-name">办公邮箱</div>
            <div>123456@tejinrui.com</div>
          </div>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  name: "Dashboard",
  computed: {
    ...mapGetters(["name"]),
  },
};
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
    .dash-content {
      display: flex;
      .dash-item {
        flex: 1;
        text-align: center;
        font-weight: 600;
        .dash-name {
          font-size: 14px;
          color: grey;
          margin-bottom: 15px;
        }
      }
    }
  }
}
</style>
